<?php
try {
    $link = @mysql_connect("127.0.0.1", "root", "");
    if(!$link){
        throw new Exception("mysql的错误：",mysql_error());
    }
}
catch(Exception $e){
    var_dump($e->getmessage());
}
?>
